import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from "@angular/common/http";

import { Observable } from 'rxjs';

@Injectable({
    providedIn: 'root'
})
export class UserInfoService {
    private baseUrl:string = "/auth/logout";

    private httpOptions = {
        headers : new HttpHeaders({
            Authorization : localStorage.getItem("token")
        })
    }

    constructor(
        private http : HttpClient
    ) { }

    loginOut() : Observable<any>{
        console.log( this.baseUrl );
        return this.http.delete( this.baseUrl );
    }

}
